home *** CD-ROM | disk | FTP | other *** search
- /* drawClockHand draws a line with the specified width and color.
- ** The line starts at 0, 0 and spans the specified length in the
- ** direction specified by angle. Despite its name, this function is
- ** a pretty generic line drawer.
- */
- defineps drawClockHand (float angle; float length; float gray; float width)
- gsave
- angle rotate
- 0 0 moveto 0 length lineto
- width setlinewidth
- gray setgray
- stroke
- grestore
- endps
-
- /* Center string at x, y at pointsize size
- */
- defineps drawClockString (int x; int y; int size; char *string)
- 0.0 setgray
- x y moveto
- /Times-Roman findfont size scalefont setfont
- (string)
- dup
- stringwidth
- pop
- 2 div
- currentpoint
- 3 -2 roll
- exch sub exch
- moveto
- show
- endps
-
-